import React,{Component} from 'react'

import { Select,Button,Table } from 'antd';

const Option = Select.Option;

class Ntable extends Component{
    constructor(props){
        super(props)
        this.state={

        }
    }
    render(){
        return(
            <div className="content">
                <Table rowSelection={this.props.rowSelection} columns={this.props.columns} dataSource={this.props.dataSource} bordered={true} pagination={this.props.pagination        
                } loading={this.props.loading} onChange={this.props.onChange } 
                />
                <div className="select-op">
                    <Button className="nomal" onClick={this.props.click}>选中全部</Button>
                    <label>已选数据：<span>{this.props.selenum}</span>条</label>
                    <div className="batch">
                        <label>批量操作</label>
                        <Select defaultValue="0" style={{ width: 120 }} onChange={(value)=>this.props.handleBatch(value)}>
                            <Option value="0">批量上架</Option>
                            <Option value="1">批量下架</Option>
                            <Option value="2">批量删除</Option>
                        </Select>
                        <Button  className="nomal" onClick={this.props.handleSure}>确定</Button>
                    </div>
                </div>
        </div>            
        )
    }
}
export default Ntable